import Vue from "vue";
import VueRouter from "vue-router";
import LoginView from "../views/LoginView.vue";
import MineView from "../views/MineView.vue";
import InterestView from "../components/mine/interest/InterestView.vue";
import UserInfoView from "../components/mine/user-info/UserInfoView.vue";
import PlateFormManagerView from "../components/mine/plateform-manager/PlateFormManagerView.vue";
import DataManagerView from "../components/manage/DataManagerView.vue";
import DataMaintainView from "../components/manage/data-page/DataMaintainView.vue";
import DataSourceViewVue from "@/views/DataSourceView.vue";
Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "datasource",
    component: DataSourceViewVue,
  },
  {
    path: "/datasource",
    name: "datasource",
    component: DataSourceViewVue,
  },
  {
    path: "/login",
    name: "login",
    component: LoginView,
  },
  {
    path: "/mine",
    name: "mine",
    component: MineView,
  },
  {
    path: "/interest",
    name: "interest",
    component: InterestView,
  },
  {
    path: "/platefrom-manager",
    name: "plateformManagerView",
    component: PlateFormManagerView,
  },
  {
    path: "/data-manage",
    name: "dataManage",
    component: DataManagerView,
  },
  {
    path: "/info",
    name: "userInfo",
    component: UserInfoView,
  },
  {
    path: "/maintain",
    name: "maintain",
    component: DataMaintainView,
  },
  {
    path: "/about",
    name: "about",
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () =>
      import(/* webpackChunkName: "about" */ "../views/AboutView.vue"),
  },
];

const router = new VueRouter({
  routes,
});

export default router;
